package com.risk.common.validator;

import com.risk.common.exception.BaseException;
import org.apache.commons.lang.StringUtils;

/**
 * 数据校验
 * @author YanLee
 * @email shadow_lucky@yeah.net
 */
public abstract class Assert {

    public static void isBlank(String str, String message) {
        if (StringUtils.isBlank(str)) {
            throw new BaseException(message);
        }
    }

    public static void isNull(Object object, String message) {
        if (object == null) {
            throw new BaseException(message);
        }
    }

}
